using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class IC_TPBOCEntryMap : EntityTypeConfiguration<IC_TPBOCEntry>
    {
        public IC_TPBOCEntryMap()
        {
            // Primary Key
            this.HasKey(t => new { t.FItemID, t.FWorkID, t.FAdvance });

            // Properties
            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FWorkID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FAdvance)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("IC_TPBOCEntry");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FWorkID).HasColumnName("FWorkID");
            this.Property(t => t.FAdvance).HasColumnName("FAdvance");
            this.Property(t => t.FPrepareTime).HasColumnName("FPrepareTime");
            this.Property(t => t.FProcessTime).HasColumnName("FProcessTime");
        }
    }
}
